ForgeEvents.onEvent("top.theillusivec4.curios.api.event.CurioEquipEvent", event => {
    global.CurioEquipEvent(event)
})
ForgeEvents.onEvent("top.theillusivec4.curios.api.event.CurioChangeEvent", event => {
    global.CurioChangeEvent(event)
})


global.CurioEquipEvent=function(/**@type {Internal.LivingEvent}*/event){
    if (CuriosApi.findCurios(event.getSlotContext().entity(),event.getStack().getItem()) != null) {
        event.setResult("deny")
    }
}

global.CurioChangeEvent=function(/**@type {Internal.LivingEvent}*/event){
    new waitRunable(1,()=>{event.entity.setHealth(event.entity.getHealth())})
}